package com.gs.spring.core.factorybean;

import java.util.Date;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

import com.gs.spring.domain.Car;

@Component(value="carFactory")
public class CarFactory implements FactoryBean<Car> {

	public Car getObject() throws Exception {
		Car car = new Car(new Date());
		System.out.println(car);
		return car;
	}

	public Class<?> getObjectType() {
		return Car.class;
	}

	public boolean isSingleton() {
		return false;
	}
	
}
